
<%@ page import="cartoonsface.Cartoon" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'cartoon.label', default: 'Cartoon')}" />
        <title>Cartoons Face</title>
    </head>
    <body>
        <div class="allshow">
        	
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div align="center"><img src="${resource(dir:'images',file:'logo.png')}" alt="Grails" border="0" /></div>
            	<div>A product developed by Friends DNS.</div>
            	<div class="mainTop">
        			The Carttons such like you!
        		</div>		
        		<div class="img"><img src="${resource(dir:"images/imagesCartoons/temp/", file:inImage)}"/><div class="desc"><h1>You!</h1></div></div>
       		 <g:each in="${listElements}" status="i" var="elementInstance">
                    
                   <g:set var="cartoonInstance" value="${elementInstance.name + '.jpg'}"/>
                   
	               <div class="img"><img src="${resource(dir:"images/imagesCartoons/cartoons/", file:cartoonInstance)}"/><div class="desc"><h2>${names.get(cartoonInstance.toString().replace('.jpg', '')) + " " + images.get(cartoonInstance.toString())}</h2> <br> <h3>${descriptions.get(cartoonInstance.toString().replace('.jpg', '')).replace("This character is the game", "Game")}</h3></div></div>
	               
	             </g:each>
	                              
            </div>
            <br>
            <div class="imageTop"><a href="${createLink(uri: '/cartoon/create')}"><img width="170" height="100" src="${resource(dir:'images',file:'back.gif')}"/></a><br><h2>Load a new image!</h2> 	
            <a href="${createLink(uri: '/cartoon/showtrainer')+'?imageName=' + inImage}"><img width="170" height="100" src="${resource(dir:'images',file:'edit.png')}"/></a><br><h2>Trainer!</h2></div>
    </body>
</html>
